package com.csproj.dispatch.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.time.ZonedDateTime;
import java.util.Objects;


/**
 * 报警信息表
 */
@ApiModel(description = "报警信息表")
@Entity
@Table(name = "t_dis_warn_info")
public class WarnInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    @Column(name = "id")
    private String id;

    /**
     * 调度表主键
     */
    @ApiModelProperty(value = "调度表主键")
    @Column(name = "dispatch_id")
    private String dispatchId;

    /**
     * 集装箱编号
     */
    @ApiModelProperty(value = "集装箱编号")
    @Column(name = "container_code")
    private String containerCode;

    /**
     * 关锁编号
     */
    @ApiModelProperty(value = "关锁编号")
    @Column(name = "lock_code")
    private String lockCode;

    /**
     * 报警类型
     */
    @ApiModelProperty(value = "报警类型")
    @Column(name = "warn_type")
    private String warnType;

    /**
     * 状态信息
     */
    @ApiModelProperty(value = "状态信息")
    @Column(name = "msg")
    private String msg;

    /**
     * 上报位置
     */
    @ApiModelProperty(value = "上报位置")
    @Column(name = "warnpostion")
    private String warnpostion;

    /**
     * 上报位置-经度
     */
    @ApiModelProperty(value = "上报位置-经度")
    @Column(name = "postion_lng")
    private String postionLng;

    /**
     * 上报位置-纬度
     */
    @ApiModelProperty(value = "上报位置-纬度")
    @Column(name = "postion_lat")
    private String postionLat;



    /**
     * 上报时间
     */
    @ApiModelProperty(value = "上报时间")
    @Column(name = "warn_time")
    private ZonedDateTime warnTime;

    /**
     * 是否处理
     */
    @ApiModelProperty(value = "是否处理")
    @Column(name = "handle_flag")
    private Boolean handleFlag;

    /**
     * 通知状态 0：未通知 1：通知成功 2：通知未成功
     */
    @ApiModelProperty(value = "通知状态 0：未通知 1：通知成功 2：通知未成功")
    @Column(name = "noticestatus")
    private String noticestatus;

    /**
     * 处理时间
     */
    @ApiModelProperty(value = "处理时间")
    @Column(name = "handle_time")
    private ZonedDateTime handleTime;

    /**
     * 处理人
     */
    @ApiModelProperty(value = "处理人")
    @Column(name = "handle_user_id")
    private String handleUserId;

    /**
     * 处理报告 如果篇幅比较大考虑clob
     */
    @ApiModelProperty(value = "处理报告 如果篇幅比较大考虑clob")
    @Column(name = "handlereport")
    private String handlereport;

    /**
     * 删除标志
     */
    @ApiModelProperty(value = "删除标志")
    @Column(name = "deleted_flag")
    private Boolean deletedFlag;

    /**
     * 删除人
     */
    @ApiModelProperty(value = "删除人")
    @Column(name = "deleter_user_id")
    private String deleterUserId;

    /**
     * 删除时间
     */
    @ApiModelProperty(value = "删除时间")
    @Column(name = "deletion_time")
    private ZonedDateTime deletionTime;

    /**
     * 最近更新时间
     */
    @ApiModelProperty(value = "最近更新时间")
    @Column(name = "last_modification_time")
    private ZonedDateTime lastModificationTime;

    /**
     * 最近更新人
     */
    @ApiModelProperty(value = "最近更新人")
    @Column(name = "last_modifier_user_id")
    private String lastModifierUserId;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @Column(name = "creation_time")
    private ZonedDateTime creationTime;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @Column(name = "creator_user_id")
    private String creatorUserId;

    @Column(name = "transport_code")
    private String transportCode;
    // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDispatchId() {
        return dispatchId;
    }

    public WarnInfo dispatchId(String dispatchId) {
        this.dispatchId = dispatchId;
        return this;
    }

    public void setDispatchId(String dispatchId) {
        this.dispatchId = dispatchId;
    }

    public String getContainerCode() {
        return containerCode;
    }
    public WarnInfo containerCode(String containerCode) {
        this.containerCode = containerCode;
        return this;
    }
    public void setContainerCode(String containerCode) {
        this.containerCode = containerCode;
    }

    public String getLockCode() {
        return lockCode;
    }

    public WarnInfo lockCode(String lockCode) {
        this.lockCode = lockCode;
        return this;
    }

    public void setLockCode(String lockCode) {
        this.lockCode = lockCode;
    }

    public String getWarnType() {
        return warnType;
    }

    public WarnInfo warnType(String warnType) {
        this.warnType = warnType;
        return this;
    }

    public void setWarnType(String warnType) {
        this.warnType = warnType;
    }

    public String getMsg() {
        return msg;
    }

    public WarnInfo msg(String msg) {
        this.msg = msg;
        return this;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getWarnpostion() {
        return warnpostion;
    }

    public WarnInfo warnpostion(String warnpostion) {
        this.warnpostion = warnpostion;
        return this;
    }

    public void setWarnpostion(String warnpostion) {
        this.warnpostion = warnpostion;
    }

    public String getPostionLng() {
        return postionLng;
    }

    public WarnInfo postionLng(String postionLng) {
        this.postionLng = postionLng;
        return this;
    }

    public void setPostionLng(String postionLng) {
        this.postionLng = postionLng;
    }

    public String getPostionLat() {
        return postionLat;
    }

    public WarnInfo postionLat(String postionLat) {
        this.postionLat = postionLat;
        return this;
    }

    public void setPostionLat(String postionLat) {
        this.postionLat = postionLat;
    }

    public ZonedDateTime getWarnTime() {
        return warnTime;
    }

    public WarnInfo warnTime(ZonedDateTime warnTime) {
        this.warnTime = warnTime;
        return this;
    }

    public void setWarnTime(ZonedDateTime warnTime) {
        this.warnTime = warnTime;
    }

    public Boolean isHandleFlag() {
        return handleFlag;
    }

    public WarnInfo handleFlag(Boolean handleFlag) {
        this.handleFlag = handleFlag;
        return this;
    }

    public void setHandleFlag(Boolean handleFlag) {
        this.handleFlag = handleFlag;
    }

    public String getNoticestatus() {
        return noticestatus;
    }

    public WarnInfo noticestatus(String noticestatus) {
        this.noticestatus = noticestatus;
        return this;
    }

    public void setNoticestatus(String noticestatus) {
        this.noticestatus = noticestatus;
    }

    public ZonedDateTime getHandleTime() {
        return handleTime;
    }

    public WarnInfo handleTime(ZonedDateTime handleTime) {
        this.handleTime = handleTime;
        return this;
    }

    public void setHandleTime(ZonedDateTime handleTime) {
        this.handleTime = handleTime;
    }

    public String getHandleUserId() {
        return handleUserId;
    }

    public WarnInfo handleUserId(String handleUserId) {
        this.handleUserId = handleUserId;
        return this;
    }

    public void setHandleUserId(String handleUserId) {
        this.handleUserId = handleUserId;
    }

    public String getHandlereport() {
        return handlereport;
    }

    public WarnInfo handlereport(String handlereport) {
        this.handlereport = handlereport;
        return this;
    }

    public void setHandlereport(String handlereport) {
        this.handlereport = handlereport;
    }

    public Boolean isDeletedFlag() {
        return deletedFlag;
    }

    public WarnInfo deletedFlag(Boolean deletedFlag) {
        this.deletedFlag = deletedFlag;
        return this;
    }

    public void setDeletedFlag(Boolean deletedFlag) {
        this.deletedFlag = deletedFlag;
    }

    public String getDeleterUserId() {
        return deleterUserId;
    }

    public WarnInfo deleterUserId(String deleterUserId) {
        this.deleterUserId = deleterUserId;
        return this;
    }

    public void setDeleterUserId(String deleterUserId) {
        this.deleterUserId = deleterUserId;
    }

    public ZonedDateTime getDeletionTime() {
        return deletionTime;
    }

    public WarnInfo deletionTime(ZonedDateTime deletionTime) {
        this.deletionTime = deletionTime;
        return this;
    }

    public void setDeletionTime(ZonedDateTime deletionTime) {
        this.deletionTime = deletionTime;
    }

    public ZonedDateTime getLastModificationTime() {
        return lastModificationTime;
    }

    public WarnInfo lastModificationTime(ZonedDateTime lastModificationTime) {
        this.lastModificationTime = lastModificationTime;
        return this;
    }

    public void setLastModificationTime(ZonedDateTime lastModificationTime) {
        this.lastModificationTime = lastModificationTime;
    }

    public String getLastModifierUserId() {
        return lastModifierUserId;
    }

    public WarnInfo lastModifierUserId(String lastModifierUserId) {
        this.lastModifierUserId = lastModifierUserId;
        return this;
    }

    public void setLastModifierUserId(String lastModifierUserId) {
        this.lastModifierUserId = lastModifierUserId;
    }

    public ZonedDateTime getCreationTime() {
        return creationTime;
    }

    public WarnInfo creationTime(ZonedDateTime creationTime) {
        this.creationTime = creationTime;
        return this;
    }

    public void setCreationTime(ZonedDateTime creationTime) {
        this.creationTime = creationTime;
    }

    public String getCreatorUserId() {
        return creatorUserId;
    }

    public WarnInfo creatorUserId(String creatorUserId) {
        this.creatorUserId = creatorUserId;
        return this;
    }

    public void setCreatorUserId(String creatorUserId) {
        this.creatorUserId = creatorUserId;
    }
    // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        WarnInfo warnInfo = (WarnInfo) o;
        if (warnInfo.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), warnInfo.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "WarnInfo{" +
            "id=" + getId() +
            ", dispatchId='" + getDispatchId() + "'" +
            ", lockCode='" + getLockCode() + "'" +
            ", warnType='" + getWarnType() + "'" +
            ", msg='" + getMsg() + "'" +
            ", warnpostion='" + getWarnpostion() + "'" +
            ", warnTime='" + getWarnTime() + "'" +
            ", handleFlag='" + isHandleFlag() + "'" +
            ", noticestatus='" + getNoticestatus() + "'" +
            ", handleTime='" + getHandleTime() + "'" +
            ", handleUserId='" + getHandleUserId() + "'" +
            ", handlereport='" + getHandlereport() + "'" +
            ", deletedFlag='" + isDeletedFlag() + "'" +
            ", deleterUserId='" + getDeleterUserId() + "'" +
            ", deletionTime='" + getDeletionTime() + "'" +
            ", lastModificationTime='" + getLastModificationTime() + "'" +
            ", lastModifierUserId='" + getLastModifierUserId() + "'" +
            ", creationTime='" + getCreationTime() + "'" +
            ", creatorUserId='" + getCreatorUserId() + "'" +
            "}";
    }

    public String getTransportCode() {
        return transportCode;
    }

    public void setTransportCode(String transportCode) {
        this.transportCode = transportCode;
    }
}
